﻿using LicPdaService;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;

namespace WindowsFormsTest
{
    public partial class Form1 : Form
    {
        //PDAPrintThreadType PDAPrint = new PDAPrintThreadType();

        //public static string PDAPrintKey = "PDAPrintKey";

        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            XmlDocument doc = new XmlDocument();//实例化参数xml报文
                                                // doc.Load(@"D:\报文明细\出库拣货扫描XML发送.xml");
                                                //doc.Load(@"D:\报文明细\出库拣货扫描发送.xml");
                                                //string xml = doc.InnerXml;
                                                //string type = "拣货扫描";
                                                //LicPdaService.MainHandler.MessageHandler(xml,type);


            //doc.Load(@"D:\报文明细\3.1空箱扫描叫料XML发送.xml");
            //string xml = doc.InnerXml;
            //string type = "空箱扫描叫料";
            //LicPdaService.MainHandler.MessageHandler(xml, type);

            //doc.Load(@"D:\报文明细\10.0出库拣货扫描发送.xml");
            //string xml = doc.InnerXml;
            //string type = "调拨通用方法";
            //LicPdaService.MainHandler.MessageHandler(xml, type);

            //doc.Load(@"D:\报文明细\10.1出库打托扫描XML发送.xml");
            //string xml = doc.InnerXml;
            //string type = "调拨通用方法";
            //LicPdaService.MainHandler.MessageHandler(xml, type);


            //doc.Load(@"D:\报文明细\10.2出库托标签打印XML发送.xml");
            //string xml = doc.InnerXml;
            //string type = "调拨通用方法";
            //LicPdaService.MainHandler.MessageHandler(xml, type);


            //doc.Load(@"D:\报文明细\11.0调拨入库扫描调拨单发送.xml");
            //string xml = doc.InnerXml;
            //string type = "调拨入库通用方法";
            //LicPdaService.MainHandler.MessageHandler(xml, type);

            //doc.Load(@"D:\报文明细\11.1调拨入库扫描托盘号发送.xml");
            //string xml = doc.InnerXml;
            //string type = "调拨入库通用方法";
            //LicPdaService.MainHandler.MessageHandler(xml, type);


            //doc.Load(@"D:\报文明细\11.2调拨入库扫描库位发送.xml");
            //string xml = doc.InnerXml;
            //string type = "调拨入库通用方法";
            //LicPdaService.MainHandler.MessageHandler(xml, type);

            //doc.Load(@"D:\报文明细\11.3调拨入库确认发送.xml");
            //string xml = doc.InnerXml;
            //string type = "调拨入库通用方法";
            //LicPdaService.MainHandler.MessageHandler(xml, type);

            //doc.Load(@"D:\报文明细\2.1打印确认XML发送.xml");
            //string xml = doc.InnerXml;
            //string type = "调拨入库通用方法";
            //LicPdaService.MainHandler.MessageHandler(xml, type);

            doc.Load(@"D:\报文明细\2.1打印确认XML发送.xml");
            string xml = doc.InnerXml;
            string type = "原料上架打印";
            LicPdaService.MainHandler.MessageHandler(xml, type);


        }

        private void bt_AutoPrint_Click(object sender, EventArgs e)
        {

        }

        //private void bt_AutoPrint_Click(object sender, EventArgs e)
        //{
        //    PDAPrint.Start(PDAPrintKey);
        //    PDAPrint.ThreadMethod(PDAPrintKey);
        //    this.bt_AutoPrint.Enabled = false;
        //}
    }
}
